<?php
	$form_bean = array(
		array(
			'field'	=>	'brand[id]', 
			'item' 	=>	'hidden'
		),
		array(
			'label'	=>	'产品分类',
			'items'	=>	array(
				array(
					'field'	=>	'brand[classid]',
					'item'	=>	'hidden',
					'value'	=>	0
				),
				array(
					'field'	=>	'classname',
					'item'	=>	'label',
					'value'	=> 	'无'
				),
				array(
					'field'	=>	'choose',
					'item'	=>	'button',
					'value'	=>	'点击选择',
					'event'	=>	'
						$("#choose").colorbox({href:"'.site_url('/manager/goods/classes/choice').'/"+document.getElementById("brand_classid").value+"?m=init&f=brand",
						onClosed:function(){
							$(".selectBox a").die();
						}});
					'
				)
			)
		),
		array(
			'label' =>	'品牌名称',
			'field' =>	'brand[name]',
			'item'  =>	'text',
			'rules' =>	'required|alpha_chinese_dash|min_length:4|max_length:64|is_exist:'.site_url('/manager/goods/classes/isExistName'),
			'msg'	=>	'请填写：汉字/字母/数字（4~64个字符，1汉字=2个字符）。'
		),
		array(
			'label' =>	'LOGO',
			'field'	=>	'brand[logo]',
			'item'	=>	'upfile',
//			'rules'	=>	'decimal',
			'msg'	=>	'上传logo图片。'
		),
		array(
			'label' =>	'简介',
			'field'	=>	'brand[intro]',
			'item'	=>	'editor',
			'rules'	=>	'max_length:1024',
			'msg'	=>	'请填写：品牌简介（最多1024个字符，1汉字=2个字符）。'
		),
		array(
			'label' =>	'品牌网址',
			'field'	=>	'brand[url]',
			'item'	=>	'text:size=60',
			'rules'	=>	'url',
			'msg'	=>	'请填写：品牌网址。'
		),
		array(
			'label' =>	'是否显示在分类导航',
			'field'	=>	'brand[isshow]',
			'item'	=>	'radio:{"1":" 是 ","0":" 否 "}',
			'value'	=>	0
		),
		array(
			'label' =>	'是否推荐',
			'field'	=>	'brand[istj]',
			'item'	=>	'radio:{"1":" 是 ","0":" 否 "}',
			'value'	=>	0
		),
		array(
			'label' =>	'排序',
			'field'	=>	'brand[sort]',
			'item'	=>	'text:size=1',
			'rules'	=>	'numeric',
			'msg'	=>	'请填写：数字。'
		),
		array(
			'label'	=>	'',
			'items'	=>	array(
				array(
					'item'	=>	'submit',
					'type'	=>	'ajax',
					'value'	=>	'提交'
				),
				array(
					'item'	=>	'reset',
					'value'	=>	'重置'
				)
			)
		)
	);
?>